package com.wc.AlgoOJ_train.train1.c4.A419;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/1/10 19:07
 * @description 整除的尾数
 * http://43.138.190.70:8888/p/A419
 */
public class Main {
    static FastReader sc = new FastReader();

    public static void main(String[] args) {
        while (true) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            if (a == 0 || b == 0)
                return;
            int[] ans = new int[10];
            int idx = 0;
            a *= 100;
            int r = a + 100;
            int ans1 = 0;
            if (a % b != 0) {
                ans1 = b - a % b;

            }
            ans[0] = ans1;
            idx++;
            a += ans1;
            while (a + b < r) {
                ans[idx++] = b + ans1;
                ans1 += b;
                a += b;
            }
            print(ans, idx);
        }
    }

    static void print(int[] ans, int idx) {
        StringBuffer br = new StringBuffer();
        // 记住补0
        br.append(ans[0] < 10 ? "0" + ans[0] : ans[0]);
        for (int i = 1; i < idx; i++) {
            br.append(' ');
            br.append(ans[i]);
        }
        System.out.println(br);
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

}
